package com.aaa.outbound.controller;


import com.aaa.entity.outbound.Pick;
import com.aaa.entity.outbound.PicktaskDetail;
import com.aaa.outbound.service.PicktaskDetailService;
import com.aaa.outbound.service.PicktaskService;
import com.aaa.vo.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author aaa
 * @since 2020-12-03
 */
@RestController
@RequestMapping("/outbound/picktask-detail")
public class PicktaskDetailController {
    @Autowired
    private PicktaskDetailService picktaskDetailService;
    @GetMapping("searchPick/{page}/{limit}")
    @ApiOperation(value = "分页查询")
    public R searchPick(@ApiParam(value = "当前页数") @PathVariable Integer page,
                        @ApiParam(value = "每页个数") @PathVariable Integer limit,
                        @ApiParam(value = "查询条件") @RequestBody PicktaskDetail picktaskDetail){
        Page<PicktaskDetail> picktaskDetailPage=picktaskDetailService.searchPicktaskDetail(page,limit,picktaskDetail);
        return R.ok().message("分页查询成功").code(200).data("picktaskDetailPage",picktaskDetailPage);
    }
}

